package com.yami.shop.mystery.common.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.mystery.common.dao.ActivityWhiteListMapper;
import com.yami.shop.mystery.common.model.ActivityWhiteList;
import com.yami.shop.mystery.common.service.ActivityWhiteListService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 白名单明细业务实现类
 *
 * @author wxf
 * @date 2023/4/4 14:59
 */
@Service
@AllArgsConstructor
public class ActivityWhiteListServiceImpl extends ServiceImpl<ActivityWhiteListMapper, ActivityWhiteList> implements ActivityWhiteListService {

    private final ActivityWhiteListMapper activityWhiteListMapper;

    /**
     *  校验用户是否在白名单中
     *
     * @param shopId
     * @param activityId
     * @param userId
     * @return
     */
    @Override
    public ActivityWhiteList selectByActivityIdAndUserId(Long shopId, Long activityId, String userId) {
        return activityWhiteListMapper.selectByActivityIdAndUserId(shopId, activityId, userId);
    }
}
